{% extends "base.html" %}
{% block extra_css %}
<style>
    /* 删除确认容器 */
    .delete-container {
        max-width: 600px;
        margin: 2rem auto;
        padding: 2rem;
        background: var(--card-bg);
        border-radius: var(--border-radius);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
    }

    .delete-title {
        color: var(--warning);
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .delete-message {
        margin-bottom: 2rem;
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .room-name {
        font-weight: 600;
        color: var(--accent);
    }

    /* 按钮组 */
    .button-group {
        display: flex;
        justify-content: center;
        gap: 1rem;
        margin-top: 2rem;
    }

    /* 删除按钮 */
    .delete-btn {
        padding: 0.75rem 2rem;
        background: var(--warning);
        color: white;
        border: none;
        border-radius: var(--border-radius);
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition);
    }

    .delete-btn:hover {
        background: #e01e6b;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(247, 37, 133, 0.3);
    }

    /* 取消按钮 */
    .cancel-btn {
        padding: 0.75rem 2rem;
        background: transparent;
        color: var(--light);
        border: 2px solid var(--gray);
        border-radius: var(--border-radius);
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition);
        text-decoration: none;
    }

    .cancel-btn:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: var(--light);
        transform: translateY(-2px);
    }

    /* 警告图标 */
    .warning-icon {
        font-size: 3rem;
        color: var(--warning);
        margin-bottom: 1rem;
    }

    /* 响应式调整 */
    @media (max-width: 768px) {
        .delete-container {
            padding: 1.5rem;
            margin: 1rem;
        }

        .delete-title {
            font-size: 1.5rem;
        }

        .button-group {
            flex-direction: column;
        }

        .delete-btn, .cancel-btn {
            width: 100%;
        }
    }
</style>
{% endblock %}

{% block content %}
<div class="delete-container">
    <div class="warning-icon">⚠️</div>
    <h2 class="delete-title">确认删除房间</h2>

    <p class="delete-message">
        您确定要永久删除聊天室 <span class="room-name">{{ room.name }}</span> 吗？
        <br>
        此操作无法撤销，所有聊天记录将被删除。
    </p>

    <form method="post">
        {% csrf_token %}
        <div class="button-group">
            <button type="submit" class="delete-btn">确认删除</button>
            <a href="{% url 'Chat:manage_room' room_id=room.id %}" class="cancel-btn">取消</a>
        </div>
    </form>
</div>
{% endblock %}